package org.txazo.blog.commons.xml;

import java.io.FileInputStream;
import java.util.Set;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.txazo.blog.util.ContextUtil;

/**
 * XmlLoader
 * 
 * @author Tu XiaoZhou
 * @since 2013-09-04
 */
public class XmlLoader {

	public static Set<String> loaderUri() throws Exception {
		SAXParserFactory factory = SAXParserFactory.newInstance();
		SAXParser parser = factory.newSAXParser();
		XmlFilterParser xmlParser = new XmlFilterParser();
		parser.parse(new FileInputStream(ContextUtil.getWebClassPath()
				+ "/filter.xml"), xmlParser);
		return xmlParser.getUris();
	}

}